<!DOCTYPE html>
<html  class="language_zh">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="keywords" content="">
    <meta name="description" content="[]">
    <meta name="generator" content="teedoc">
    <meta name="markdown-generator" content="teedoc-plugin-markdown-parser">
        <link rel="stylesheet" href="/static/css/theme_default/prism.min.css" type="text/css"/>
        <link rel="stylesheet" href="/static/css/theme_default/dark.css" type="text/css"/>
        <link rel="stylesheet" href="/static/css/theme_default/light.css" type="text/css"/>
        <link rel="stylesheet" href="/static/css/custom.css" type="text/css"/>
        <script src="/static/js/theme_default/jquery.min.js"></script>
        <script src="/static/js/theme_default/pre_main.js"></script>
        <link rel="stylesheet" href="/static/css/search/style.css" type="text/css"/>
        <script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?91ac08174b63c5c88f71f8a94004a1fe";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
    <title>teedoc</title>
</head>
<body>
    
            <div id="navbar">
                <div id="navbar_menu">
                    <a class="site_title" href="/"><img class="site_logo" src="/static/image/logo.png" alt="teedoc logo"><h2>teedoc</h2></a>
                    <a id="navbar_menu_btn"></a>
                </div>
                <div id="navbar_items">
                    <div>
                        <ul id="nav_left">
<li class=""><a  href="/get_started/zh/">安装使用</a></li>
<li class="active"><a  href="/develop/zh/">开发</a></li>
</ul>

                    </div>
                    <div>
                        <ul id="nav_right">
<li class=""><a target="_blank" href="https://github.com/neutree/teedoc">github</a></li>
<li class="sub_items "><a  href="">Language: 中文</a><ul><li class="active"><a  href="/develop/zh/">中文</a></li>
<li class=""><a  href="/develop/en/">English</a></li>
</ul></li>
</ul>

                        <ul class="nav_plugins"><li><a id="themes" class="light"></a></li></ul><ul class="nav_plugins"><li><a id="search"><span class="icon"></span><span class="placeholder">搜索</span>
                            <div id="search_hints">
                                <span id="search_input_hint">输入关键词，多关键词空格隔开</span>
                                <span id="search_loading_hint">正在加载，请稍候。。。</span>
                                <span id="search_download_err_hint">下载文件失败，请刷新重试或检查网络</span>
                                <span id="search_other_docs_result_hint">来自其它文档的结果</span>
                                <span id="search_curr_doc_result_hint">当前文档搜索结果</span>
                            </div></a></li></ul>
                    </div>
                </div>
            </div>
    
        <div id="wrapper">
            
            <div id="sidebar_wrapper">
                <div id="sidebar">
                    <div id="sidebar_title">
                        
                    </div>
                    <ul class="show">
<li class="active with_link"><a href="/develop/zh/index.html"><span class="label">teedoc 开发</span><span class=""></span></a></li>
</ul>

                </div>
            </div>
            <div id="menu_wrapper">
                                    <div id="menu">
                                    </div>
                                </div>
            <div id="article">
                <div id="content_wrapper">
                    <div id="content_body">
                        <div id="article_title">
                            <h1></h1>
                        </div>
                        <div id="article_tags">
                            <ul></ul>
                        </div>
                        <div id="article_content">
                            <h1 id="teedoc">开发 teedoc</h1>

<h2 id="-1">获得源码</h2>

<pre><code>git clone https://github.com/Neutree/teedoc
</code></pre>

<h2 id="-2">安装环境</h2>

<pre><code>sudo apt install python3 python3-pip
cd teedoc
pip3 install -r requirements.txt
</code></pre>

<h2 id="-3">运行源码</h2>

<ul>
<li>安装插件</li>
</ul>

<pre><code>python3 teedoc/teedoc_main.py  -p examples/teedoc_site install
</code></pre>

<ul>
<li>运行</li>
</ul>

<pre><code>python3 teedoc/teedoc_main.py  -p examples/teedoc_site build
python3 teedoc/teedoc_main.py  -p examples/teedoc_site serve
</code></pre>

<ul>
<li>插件导入问题和更新调试问题</li>
</ul>

<p>在<code>site_config.json</code>中设置插件的本地路径，比如：</p>

<pre><code class="json language-json">"teedoc-plugin-markdown-parser":{
            "from": "../../plugins/teedoc-plugin-markdown-parser"
        }
</code></pre>

<p>然后在运行时将会优先从这个路径导入包（将这个路径加入<code>sys.path</code>，然后导入），而不是系统路径，可以保证修改及时生效</p>

<h2 id="-4">调试</h2>

<p>在 vscode 中调试，直接调试单文件 <code>teedoc_debug.py</code> 文件即可</p>

                        </div>
                    </div>
                    <div id="previous_next">
                        <div id="previous">
                            
                        </div>
                        <div id="next">
                            
                        </div>
                    </div>
                </div>
                <div id="toc">
                    <div>
                        <ul>
  <li><a href="#teedoc">开发 teedoc</a>
  <ul>
    <li><a href="#-1">获得源码</a></li>
    <li><a href="#-2">安装环境</a></li>
    <li><a href="#-3">运行源码</a></li>
    <li><a href="#-4">调试</a></li>
  </ul></li>
</ul>

                    </div>
                </div>
            </div>
        </div>
        <a id="to_top" href="#"></a>
        <div id="doc_footer">
                        
            <div id="footer">
                <div id="footer_top">
                    <ul>
<li><a>链接</a><ul><li><a target="_blank" href="https://github.com/neutree/teedoc">使用 teedoc 构建</a></li>
<li><a target="_blank" href="https://neucrack.com">Copyright © 2021 Neucrack</a></li>
<li><a  href="/sitemap.xml">网站地图</a></li>
</ul>
</li>
<li><a>源码</a><ul><li><a target="_blank" href="https://github.com/neutree/teedoc">github</a></li>
<li><a target="_blank" href="https://github.com/teedoc/teedoc.github.io">本网站源文件</a></li>
</ul>
</li>
</ul>

                </div>
                <div id="footer_bottom">
                    <ul>
<li><a target="_blank" href="https://beian.miit.gov.cn">*ICP备********号-1</a></li>
<li><a target="_blank" href="https://beian.miit.gov.cn/#/Integrated/index">*公网安备**************号</a></li>
</ul>

                </div>
            </div>
                    </div>
</body>
<script src="/static/js/theme_default/main.js"></script>
<script src="/static/css/theme_default/prism.min.js"></script>
<script src="/static/js/custom.js"></script>
<script src="/static/js/search/main.js"></script>
</html>
